home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlStatusBarGetBorders.au3 < prev    next >
Encoding:
Text File  |  2006-08-01  |  968 b   |  33 lines

  1. opt("MustDeclareVars", 1)
  2.  
  3. #include <GUIConstants.au3>
  4. #Include <GuiStatusBar.au3>
  5.  
  6. Local $gui, $StatusBar1, $msg
  7. Local $a_PartsRightEdge[3] = [150, 300, -1]
  8. Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"]
  9.  
  10. $gui = GUICreate("Status Bar Get Border Widths", 500, -1, -1, -1, $WS_SIZEBOX)
  11. $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText)
  12.  
  13. Local $a_borders = _GUICtrlStatusBarGetBorders($StatusBar1)
  14. If IsArray($a_borders) Then
  15.     _GUICtrlStatusBarSetText($StatusBar1, "horizontal border: " & $a_borders[0], 0)
  16.     _GUICtrlStatusBarSetText($StatusBar1, "vertical border: " & $a_borders[1], 1)
  17.     _GUICtrlStatusBarSetText($StatusBar1, "between rectangles: " & $a_borders[2], 2)
  18. EndIf
  19.  
  20. GUISetState(@SW_SHOW)
  21.  
  22. While 1
  23.     $msg = GUIGetMsg()
  24.     Select
  25.         Case $msg = $GUI_EVENT_RESIZED
  26.             _GUICtrlStatusBarResize ($StatusBar1)
  27.         Case $msg = $GUI_EVENT_CLOSE
  28.             ExitLoop
  29.         Case Else
  30.             ;;;;;
  31.     EndSelect
  32.     
  33. WEnd